#include <iostream>
#include <fstream>
#include <vector>
#include "../utils.h"
#include "../sets.h"
using namespace std;

/*
    vector<pair<bset,bomba> > getSets(const vector< pair<pol,pol> >& ptsP, 
	double r, double it, double et, int disc, int iter, int csets,
	double alpha );
 */

int main(int argc, char *argv[]) {
	if (argc!=2) {
		cout << "USO: testSets archivoEntrada" << endl;
		return 1;
	}
	ifstream in(argv[1]);
	int n;
	in >> n;
	vector< pair<pol,pol> > ptsP(n, make_pair(pol(4),pol(4)));;
	forn(i,n) {
		forn(j,4) in >> ptsP[i].first[j];
		forn(j,4) in >> ptsP[i].second[j];
	}
	forn(csets,10) {
		cout << "top " << csets*3 << endl;
		vector<pair<bset,bomba> > r=getSets(ptsP, 1.0, 0.0, 1.0, 2, 5, csets*3, 0.1);
		forn(i,r.size()) {
			forn(j,ptsP.size()) cout << r[i].first[j];
			cout << "   at " << r[i].second.x << "," << r[i].second.y << " t="
				<< r[i].second.t << endl;
		}
	}
	return 0;
}
